package unrn.isiii.dao.impl;

import org.springframework.stereotype.Component;

import unrn.isiii.dao.ILineaDao;
import unrn.isiii.dao.generic.DataAccessService;
import unrn.isiii.model.Linea;
import unrn.isiii.model.Usuario;

@Component
public class LineaServiceImpl extends DataAccessService<Linea> implements
		ILineaDao {

	public LineaServiceImpl() {
		super(Linea.class);
	}
	
	public Linea findByNombre(String nombre) {
		return (Linea) getEm()
				.createQuery(
						"select o from Linea o "
						+ "where o.nombre = :nombre")
				.setParameter("nombre", nombre).getResultList().get(0);
	}

}
